<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/inc/taglib.inc" %>
<%@ include file="/WEB-INF/inc/script.inc" %>
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<base href="${base}">
    <title>中金通 | 客户管理</title>
    
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="font-awesome/css/font-awesome.css" rel="stylesheet">
    <link href="js/plugins/jquery-ui/jquery-ui.min.css" rel="stylesheet">
    <!-- FooTable -->
    <link href="css/plugins/footable/footable.core.css" rel="stylesheet">
    <!-- Data Tables -->
    <link href="css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
    <link href="css/plugins/dataTables/dataTables.responsive.css" rel="stylesheet">
    <link href="css/plugins/dataTables/dataTables.tableTools.min.css" rel="stylesheet">
    
    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">

    <link href="css/plugins/datapicker/datepicker3.css" rel="stylesheet">
    <link href="css/plugins/blueimp/css/blueimp-gallery.min1.css" rel="stylesheet">
	<style type="text/css">
	.modal{
	  z-index: 16 !important;
	}
	.modal-backdrop {
	  z-index: 15 !important;
	}
	.detailText
	{
	 padding:6px 12px; 
	}
  	.blueimp-gallery {
       	width:600px;
       	height:400px;
           margin: 0px;
       }
       .blueimp-gallery>.slides {
		position: relative;
		height: 100%;
		overflow-x: hidden
	}
	.blueimp-gallery>.slides>.slide {
		position: relative;
		float: left;
		margin-top:15px;
		height: 90%;
		text-align: center;
		-webkit-transition-timing-function: cubic-bezier(0.645,.045,.355,1);
		-moz-transition-timing-function: cubic-bezier(0.645,.045,.355,1);
		-ms-transition-timing-function: cubic-bezier(0.645,.045,.355,1);
		-o-transition-timing-function: cubic-bezier(0.645,.045,.355,1);
		transition-timing-function: cubic-bezier(0.645,.045,.355,1)
	}
	</style>
</head>

<body>

    <div id="wrapper">

    	<!-- 左侧菜单 -->
        <jsp:include page="/WEB-INF/jsp/common/main-menu.jsp"></jsp:include>

        <div id="page-wrapper" class="gray-bg">
        <div class="row border-bottom">
        <!-- 头部工具栏区 -->
        <jsp:include page="/WEB-INF/jsp/common/main-header.jsp"></jsp:include>
        </div>
            <div class="row wrapper border-bottom white-bg page-heading">
                <div class="col-lg-10">
                    <h2>客户管理</h2>
                    <ol class="breadcrumb">
                        <li>
                            <a href="common/platform">Home</a>
                        </li>
                        <li>
                            <a href="investor/list">投资人管理</a>
                        </li>
                        <li class="active">
                            <strong>投资人详情</strong>
                        </li>
                    </ol>
                </div>
                <div class="col-lg-2">

                </div>
            </div>

        <div class="row" style="margin-top:10px;">
	        <div class="col-md-12">
	        <div class="tabs-container">
	        <ul class="nav nav-tabs">
	            <li >
					<a href="investor/list">
						 投资人列表
					</a>
				</li>
				<li>
					<a href="investor/add">
						 新增投资人
					</a>
				</li>
				<li>
					<a href="investor/group">
						 投资人组别
					</a>
				</li>
				<li class="active">
					<a href="">
						 投资人详情
					</a>
				</li>
	        </ul>
				<div class="tab-content">
		              <div class="tab-pane active">
		                  <div class="panel-body">
		                      <div class="wrapper wrapper-content animated fadeInRight ecommerce">
					            <div class="row">
					                <div class="col-lg-12">
				                        <form method="post" id="addForm" enctype="multipart/form-data" action="investor/doAdd" class="form-horizontal">
									        <div style="padding-left:100px;">
										        <button type="button" class="btn btn-w-m btn-primary" id="info_modify">修改</button>
										        <button type="button" class="btn btn-w-m btn-primary" id="btn_allot_employee" data-toggle="modal" data-target="#dealEmpModal">分配理财师</button>
										        <button type="button" class="btn btn-w-m btn-warning" id="btn_show_modal" data-toggle="modal" data-target="#myModal">新增联系记录</button>
									        </div>
									        <br/>
			                                <div class="form-group"><label class="col-sm-2 control-label">姓名</label>
			                                    <div class="col-sm-4">
			                                    	<div id="name" class="detailText">${model.name}</div>
			                                    	<input type="text" style="display:none;"  id="investorId" value="${model.id}"> 
			                                    </div>
			                                </div>
			                                <div class="form-group"><label class="col-sm-2 control-label">头像</label>
			                                    <div class="col-sm-4">
			                                    	<div id="name" class="detailText">
			                                    		<c:choose>
														   <c:when test="${model.avatar == null}">
														   		<a href="${imagePrefix}investor/default.jpeg" title="头像" data-gallery="">
														   			<img style="border:1px solid #B7D4D7;width:100px;height:100px;" alt="头像" id="images" src= "${imagePrefix}investor/default.jpeg">
														   		</a>
														   		<div id="blueimp-gallery" class="blueimp-gallery">
					                                				<div class="slides"></div>
					                                				<h3 class="title"></h3>
					                                				<a class="close">×</a>
					                            				</div>
														   </c:when>
														   <c:otherwise> 
																<img style="border:1px solid #B7D4D7;width:100px;height:100px;" alt="头像" id="images" src= "${imagePrefix}${model.avatar}">
														   		<%-- <img style="border:1px solid #B7D4D7;width:100px;height:100px;" alt="头像" id="images" src= "${base}investor/downImg?path=${model.avatar}"> --%>
														   </c:otherwise>
														</c:choose>
			                                    	</div>
			                                    </div>
			                                </div>
			                                <div class="form-group"><label class="col-sm-2 control-label">联系电话</label>
			                                    <div class="col-sm-4">
			                                   	 	<div  id="mobile" class="detailText">
			                                   	 		 <c:choose>
														   <c:when test="${model.mobile == null}">--</c:when>
														   <c:otherwise>${model.mobile}</c:otherwise>
														 </c:choose>
			                                   	 	</div>
			                                    </div>
			                                </div>
			                                <div class="form-group"><label class="col-sm-2 control-label" for="datetimepicker">出生年月</label>
				                             	 <div class="col-sm-4">
						                            <div  id="birthday" class="detailText">
						                           		 <c:choose>
														   <c:when test="${model.birthday == null}">--</c:when>
														   <c:otherwise><fmt:formatDate value="${model.birthday}" pattern="yyyy年MM月dd日" /> </c:otherwise>
														 </c:choose>
						                            </div> 
							                     </div>
			                                </div>
			                                <div class="form-group"><label class="col-sm-2 control-label">邮箱</label>
			                                    <div class="col-sm-4">
			                                    	<div  id="email" class="detailText">
			                                    		 <c:choose>
														   <c:when test="${model.email == null}">--</c:when>
														   <c:otherwise>${model.email}</c:otherwise>
														 </c:choose>
			                                    	</div> 
			                                   </div>
			                                </div>
			                                <div class="form-group"><label class="col-lg-2 control-label">证件类型</label>
			                                    <div class="col-sm-4"> 
			                                   		 <div  id="idType" class="detailText">
			                                   		 	 <c:choose>
														   <c:when test="${model.idType == null}">身份证</c:when>
														   <c:otherwise>${model.idType}</c:otherwise>
														 </c:choose>
			                                   		 </div> 
							                    </div>
			                                </div>
			                                <div class="form-group"><label class="col-lg-2 control-label">证件号</label>
			                                    <div class="col-sm-4">
			                                   		 <div  id="idCard" class="detailText">
				                                   		 <c:choose>
														   <c:when test="${model.idcard == null}">--</c:when>
														   <c:otherwise>${model.idcard}</c:otherwise>
														 </c:choose>
			                                   		 </div> 
			                                    </div>
			                                </div>
			                                <div class="form-group"><label class="col-sm-2 control-label">性别</label>
			                                    <div class="col-sm-8">
			                                    	<c:choose>
													   <c:when test="${model.gender == null}"><div  id="gender" class="detailText">--</div></c:when>
													   <c:otherwise>
													   	 <c:if test="${model.gender eq 1}">
				                                    	 	<div  id="gender" class="detailText">男</div> 
				                                    	 </c:if>
				                                    	 <c:if test="${model.gender eq 2}">
				                                    	 	<div  id="gender" class="detailText">女</div> 
				                                    	 </c:if>
													   </c:otherwise>
													 </c:choose>
			                                    </div>
			                                </div>
			                                <div class="form-group"><label class="col-lg-2 control-label">公司</label>
			                                    <div class="col-lg-4"><div  id="company" class="detailText">
		                                   			 <c:choose>
													   <c:when test="${model.company == null}">--</c:when>
													   <c:otherwise>${model.company}</c:otherwise>
													 </c:choose>
			                                    </div> </div>
			                                </div>
			                                <div class="form-group"><label class="col-lg-2 control-label">电话号码</label>
			                                    <div class="col-lg-4"><div  id="telephonr" class="detailText">
			                                    	 <c:choose>
													   <c:when test="${model.telephone == null}">--</c:when>
													   <c:otherwise>${model.telephone}</c:otherwise>
													 </c:choose>
			                                    </div></div>
			                                </div>
			                                <div class="form-group"><label class="col-sm-2 control-label">详细地址</label>
			                                   <div class="col-lg-4"><div  id="address" class="detailText">
			                                   		 <c:choose>
													   <c:when test="${model.address == null}">--</c:when>
													   <c:otherwise>${model.address}</c:otherwise>
													 </c:choose>
			                                   </div> </div>
			                                </div>
			                                <div class="form-group"><label class="col-sm-2 control-label">所属组别</label>
												 <div class="col-lg-4">
												 	 <c:choose>
													   <c:when test="${groupList.size() == 0}"><div class="detailText">--</div></c:when>
													   <c:otherwise>
														   	 <c:forEach items="${groupList}" var="list" varStatus="st">
																<span class="detailText">${list.name}</span>
															 </c:forEach>
													   </c:otherwise>
													 </c:choose>
												 </div>
			                                </div>
			                                <div class="form-group"><label class="col-lg-2 control-label">理财师</label>
			                                    <div class="col-lg-4"><div  id="telephonr" class="detailText">
			                                     	 <c:choose>
													   <c:when test="${model.employeeName == null}">--</c:when>
													   <c:otherwise>${model.employeeName}</c:otherwise>
													 </c:choose>
			                                    </div> </div>
			                                </div>
			                                <div class="form-group"><label class="col-sm-2 control-label">备注</label>
			                                    <div class="col-sm-4"><div  name="remark" class="detailText">
			                                   		 <c:choose>
													   <c:when test="${model.remark == null}">--</c:when>
													   <c:otherwise>${model.remark}</c:otherwise>
													 </c:choose>
			                                    </div></div>
			                                </div>
			                            </form>
					                </div>
					            </div>
				  			</div>
			     		</div>
			    	</div>
			   </div>
		  </div>
		</div>
        </div>
        <div class="modal inmodal" id="myModal" tabindex="-1" role="dialog" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content animated fadeIn">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">关闭</span>
                            </button>
                            <h4 class="modal-title">新增联系记录</h4>
                            <small class="font-bold">投资人:${model.name}</small>
                    	</div>
	                    <div class="modal-body">
	                         <div class="form-group"><label>联系内容</label> <textarea style="resize:none;height:80px;font-family:inherit;" type="text" id="rela_content" placeholder="请输入您的联系内容" class="form-control"></textarea>
		                    	 <br/>
		                    	 <div id="time"></div>
		                    </div>
		                    <div class="modal-footer">
		                        <button type="button" class="btn btn-white" id="dsimiss_add_relation" data-dismiss="modal">取消</button>
		                        <button type="button" id="btn_add_relation" class="btn btn-primary">保存</button>
		                    </div>
               	 		</div>
           	 		</div>
        		</div> 
        </div>
        
         <div class="modal mymodal inmodal" id="dealEmpModal" tabindex="-1" role="dialog" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content animated fadeIn">
                        <div class="modal-header">
                        	<button type="button" class="close" data-dismiss="modal" id="deal_emp_miss"><span aria-hidden="true">&times;</span><span class="sr-only">关闭</span>
                            </button>
                            <h4 class="modal-title">分配理财师</h4>
                            <small class="font-bold">投资人:${model.name}</small>
                    </div>
                     <div class="modal-body">
                    	<div class="form-group"><label>理财师</label>
                    		<input id="tags" placeholder="请输入理财师姓名或工号" class="ui-autocomplete-input form-control" autocomplete="off">
                    	</div>
                    	<label>理财师姓名:&nbsp;&nbsp;&nbsp;<span id="employeeName" ></span></label><br/>
                    	<label>理财师工号:&nbsp;&nbsp;&nbsp;<span id="employeeNo" ></span></label>
                    	<input style="display:none;" id="employeeId" value="" >
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-white" id="dsimiss_deal_emp" data-dismiss="modal">取消</button>
                        <button type="button" id="btn_deal_emp_new" class="btn btn-primary">确定</button>
                    </div>
                </div>
        </div></div>
        <!-- 底部版权 -->
        <jsp:include page="/WEB-INF/jsp/common/main-footer.jsp"></jsp:include>

        </div>
        </div>



    <!-- Mainly scripts -->
    <script>     
		document.getElementById('time').innerHTML=new Date().toLocaleString();     
		setInterval("document.getElementById('time').innerHTML=new Date().toLocaleString();",1000);  
	</script> 
    <script src="js/jquery-2.1.1.js"></script>
    <script src="js/plugins/validate/jquery.validate.min.js"></script>
    <script src="js/plugins/jeditable/jquery.jeditable.js"></script>
	<script src="js/jquery.serialize-object.min.js" type="text/javascript"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="js/plugins/datapicker/bootstrap-datepicker.js"></script>

    <!-- Custom and plugin javascript -->
    <script src="js/inspinia.js"></script>
    <script src="js/plugins/pace/pace.min.js"></script>
    <script src="js/plugins/jquery-ui/jquery-ui.min.js"></script>
	<script src="js/plugins/bootbox/bootbox.min.js" type="text/javascript"></script>
    
    <!-- Data picker -->
    <script src="js/plugins/datapicker/bootstrap-datepicker.js"></script>
    
    <!-- Data Tables -->
    <script src="js/plugins/dataTables/jquery.dataTables.min.js"></script>
    <script src="js/plugins/dataTables/dataTables.bootstrap.js"></script>
    <script src="js/plugins/dataTables/dataTables.responsive.js"></script>
    <script src="js/plugins/dataTables/dataTables.tableTools.min.js"></script>
    
    <!-- 业务js -->
    <script src="js/investor/detail.js?v=${jsVersion}"></script>
    <script src="js/investor/utils.js?v=${jsVersion}"></script>
	<!-- FooTable -->
    <!-- Page-Level Scripts -->
    <script>
   	    
        $(document).ready(function() {
           // $('.footable').footable();

            $('#date_added').datepicker({
                todayBtn: "linked",
                keyboardNavigation: false,
                forceParse: false,
                calendarWeeks: true,
                autoclose: true
            });

            $('#date_modified').datepicker({
                todayBtn: "linked",
                keyboardNavigation: false,
                forceParse: false,
                calendarWeeks: true,
                autoclose: true
            });

        });

    </script>

</body>

</html>
